package mapper;

import com.lagou.entity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;




/**
 * 用户表(User)表数据库访问层
 *
 * @author makejava
 * @since 2021-11-25 23:38:03
 */
@Service
public interface UserDao {

   //用户登录
   User login(@Param ("phone")String phone, @Param ("password")String password);

   //检查手机号是否注册 0未注册 1已经注册
   Integer checkPhone(String phone);

   //自动注册 返回受影响的行数
   Integer register(@Param ("phone")String phone,@Param ("password")String password);

   //修改用户信息
   Integer updateUserInfo(@Param ("id")Integer id,@Param ("portrait")String portrait,@Param ("name")String name);

   //修改用户密码
   Integer updatePassword(@Param ("id") Integer id,@Param ("password") String password);
}

